package edu.cibertec.action;

import java.util.ArrayList;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;

import com.opensymphony.xwork2.ActionSupport;

import edu.cibertec.service.ExpedienteService;
import edu.cibertec.util.ConsultaExpedienteDTO;

@SuppressWarnings("serial")
@ParentPackage(value = "CiberStudio")
public class ConsultaExpedienteAction extends ActionSupport{
	
	ExpedienteService svExpediente= new ExpedienteService();
	
	private ArrayList<ConsultaExpedienteDTO> consultas;
	private ConsultaExpedienteDTO consulta;
	private String nroExpediente;
	
	@Action(value = "/a_ConsultarExpedienteCliente", results = { @Result(location = "t_consultarExpediente", name = "success", type = "tiles") })
	public String buscarUsuario() {
		consultas = svExpediente.listaConsultaExpediente(nroExpediente);
		return SUCCESS;
	}

	public ArrayList<ConsultaExpedienteDTO> getConsultas() {
		return consultas;
	}

	public void setConsultas(ArrayList<ConsultaExpedienteDTO> consultas) {
		this.consultas = consultas;
	}

	public ConsultaExpedienteDTO getConsulta() {
		return consulta;
	}

	public void setConsulta(ConsultaExpedienteDTO consulta) {
		this.consulta = consulta;
	}

	public String getNroExpediente() {
		return nroExpediente;
	}

	public void setNroExpediente(String nroExpediente) {
		this.nroExpediente = nroExpediente;
	}
	
	
	
}
